﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Suzsoft.Smart.EntityCore;
using System.Runtime.Serialization;
using ESOL.Common.Schema;
using System.Data;

namespace ESOL.Common.Entity
{
    [DataContract]
    [Serializable]
    public partial class BptBlueprintChangesEntity : EntityBase
    {
        public BptBlueprintChangesTable TableSchema
        {
            get
            {
                return BptBlueprintChangesTable.Current;
            }
        }

        public BptBlueprintChangesEntity()
        {

        }

        public BptBlueprintChangesEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
            this.ChangesCode = Convert.ToString(CommonFunctions.ToObject(dr["CHANGES_CODE"]));
            this.ProdApplicationItemId = Convert.ToString(CommonFunctions.ToObject(dr["PROD_APPLICATION_ITEM_ID"]));
            this.SponsorPerson = Convert.ToString(CommonFunctions.ToObject(dr["SPONSOR_PERSON"]));
            this.SponsorDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["SPONSOR_DATE"]));
            this.RecivePerson = Convert.ToString(CommonFunctions.ToObject(dr["RECIVE_PERSON"]));
            this.ReciveDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["RECIVE_DATE"]));
            this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
            this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
            this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
            this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.Remarks = Convert.ToString(CommonFunctions.ToObject(dr["REMARKS"]));
            this.PlanOrderId = Convert.ToString(CommonFunctions.ToObject(dr["PLAN_ORDER_ID"]));
        }

        public BptBlueprintChangesEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
            this.ChangesCode = Convert.ToString(CommonFunctions.ToObject(dr["CHANGES_CODE"]));
            this.ProdApplicationItemId = Convert.ToString(CommonFunctions.ToObject(dr["PROD_APPLICATION_ITEM_ID"]));
            this.SponsorPerson = Convert.ToString(CommonFunctions.ToObject(dr["SPONSOR_PERSON"]));
            this.SponsorDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["SPONSOR_DATE"]));
            this.RecivePerson = Convert.ToString(CommonFunctions.ToObject(dr["RECIVE_PERSON"]));
            this.ReciveDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["RECIVE_DATE"]));
            this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
            this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
            this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
            this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.Remarks = Convert.ToString(CommonFunctions.ToObject(dr["REMARKS"]));
            this.PlanOrderId = Convert.ToString(CommonFunctions.ToObject(dr["PLAN_ORDER_ID"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return BptBlueprintChangesTable.Current;
            }
        }

        #region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(BptBlueprintChangesTable.C_ID)); }
            set { SetData(BptBlueprintChangesTable.C_ID, value); }
        }

        [DataMember]
        public string ChangesCode
        {
            get { return Convert.ToString(GetData(BptBlueprintChangesTable.C_CHANGES_CODE)); }
            set { SetData(BptBlueprintChangesTable.C_CHANGES_CODE, value); }
        }

        [DataMember]
        public string ProdApplicationItemId
        {
            get { return Convert.ToString(GetData(BptBlueprintChangesTable.C_PROD_APPLICATION_ITEM_ID)); }
            set { SetData(BptBlueprintChangesTable.C_PROD_APPLICATION_ITEM_ID, value); }
        }

        [DataMember]
        public string SponsorPerson
        {
            get { return Convert.ToString(GetData(BptBlueprintChangesTable.C_SPONSOR_PERSON)); }
            set { SetData(BptBlueprintChangesTable.C_SPONSOR_PERSON, value); }
        }

        [DataMember]
        public DateTime SponsorDate
        {
            get { return Convert.ToDateTime(GetData(BptBlueprintChangesTable.C_SPONSOR_DATE)); }
            set { SetData(BptBlueprintChangesTable.C_SPONSOR_DATE, value); }
        }

        [DataMember]
        public string RecivePerson
        {
            get { return Convert.ToString(GetData(BptBlueprintChangesTable.C_RECIVE_PERSON)); }
            set { SetData(BptBlueprintChangesTable.C_RECIVE_PERSON, value); }
        }

        [DataMember]
        public DateTime ReciveDate
        {
            get { return Convert.ToDateTime(GetData(BptBlueprintChangesTable.C_RECIVE_DATE)); }
            set { SetData(BptBlueprintChangesTable.C_RECIVE_DATE, value); }
        }

        [DataMember]
        public string UpdatedBy
        {
            get { return Convert.ToString(GetData(BptBlueprintChangesTable.C_UPDATED_BY)); }
            set { SetData(BptBlueprintChangesTable.C_UPDATED_BY, value); }
        }

        [DataMember]
        public DateTime UpdatedDate
        {
            get { return Convert.ToDateTime(GetData(BptBlueprintChangesTable.C_UPDATED_DATE)); }
            set { SetData(BptBlueprintChangesTable.C_UPDATED_DATE, value); }
        }

        [DataMember]
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(BptBlueprintChangesTable.C_CREATED_BY)); }
            set { SetData(BptBlueprintChangesTable.C_CREATED_BY, value); }
        }

        [DataMember]
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(BptBlueprintChangesTable.C_CREATED_DATE)); }
            set { SetData(BptBlueprintChangesTable.C_CREATED_DATE, value); }
        }

        [DataMember]
        public string Status
        {
            get { return Convert.ToString(GetData(BptBlueprintChangesTable.C_STATUS)); }
            set { SetData(BptBlueprintChangesTable.C_STATUS, value); }
        }

        [DataMember]
        public string Remarks
        {
            get { return Convert.ToString(GetData(BptBlueprintChangesTable.C_REMARKS)); }
            set { SetData(BptBlueprintChangesTable.C_REMARKS, value); }
        }

        [DataMember]
        public string PlanOrderId
        {
            get { return Convert.ToString(GetData(BptBlueprintChangesTable.C_PLAN_ORDER_ID)); }
            set { SetData(BptBlueprintChangesTable.C_PLAN_ORDER_ID, value); }
        }

        #endregion
    }
	
}
